Skip to content

Remove the log statement#5293

Closed
brson wants to merge 3 commits into
rust-lang:incomingfrom
brson:logging
Closed

Remove the log statement#5293
brson wants to merge 3 commits into
rust-lang:incomingfrom
brson:logging

Conversation

@brson
Copy link
Copy Markdown
Contributor

@brson brson commented Mar 9, 2013

r? @graydon

This removes log from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to __log and hides it behind macros.

After this the only way to log is with debug!, info!, etc. I figure that if there is demand for log! we can add it back later.

I am not sure that we ever agreed on this course of action, though I think there is consensus that log shouldn't be a statement.

@bstrie
Copy link
Copy Markdown
Contributor

bstrie commented Mar 9, 2013

+1. Now that you can do error!(foo) there absolutely no reason to prefer log(error, foo), and this also frees up people to use the error, debug, etc identifiers in their own code.

@brson
Copy link
Copy Markdown
Contributor Author

brson commented Mar 9, 2013

This would close #3941 and fixes part of #3627

@graydon
Copy link
Copy Markdown
Contributor

graydon commented Mar 11, 2013

I'm ok removing the expression; it seems like the long term fix (not just renaming) requires thinking about either globals or fast tls.

brson added 3 commits March 11, 2013 23:19
We can't quite remove logging from the language, but this hides the
keyword.
bors added a commit that referenced this pull request Mar 13, 2013
r? @graydon

This removes `log` from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to `__log` and hides it behind macros.

After this the only way to log is with `debug!`, `info!`, etc. I figure that if there is demand for `log!` we can add it back later.

I am not sure that we ever agreed on this course of action, though I *think* there is consensus that `log` shouldn't be a statement.
@bors bors closed this Mar 13, 2013
bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2020
…ansch

don't emit lifetime lint warnings for code inside macros.

Fixes rust-lang#5283

changelog: Don't emit lifetime lint warnings for code inside macros.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants